<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'AddUser.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

<script type="text/javascript">
	var msg ='<%=session.getAttribute("tipMessage")%>';
	if (msg != ""&&msg!=null) {
	<%session.setAttribute("tipMessage","");%>
		alert(msg);
		
	}
</script>

<script type="text/javascript">
function check(){

 var projectname=document.getElementById('projectname');


 if(!projectname.value){
 alert("请输入工作组名!");
 projectname.focus();
 return false;
 }
 if(projectname.value.length>15){
  alert("项目名长度超出15!");
 projectname.focus();
 return false;
 }
 }
</script>

<style>       
body,h2{    
padding:0px;    
margin:0px auto;    
}    
#wrapper{    
width:300px;    
height:300px;    
padding:0px;    
margin:0px auto; 
border:1px   #4682B4   solid;    
}    
h2{ 
  background-color: #4682B4 ;    
  color:#FFFFFF;    
  padding:10px 100px;  
  } 
   span{ 
   color:#FF0000;    
} 
   #shoulder{ 
      padding:10px;  
   line-height:50px;   
   background-color: #E6E6FA ;  
   
}    
#fore{ 
   text-align:left; 
    padding:10px;     }       
 #button{ 
   background-color:#FF0000;    
padding:0px;    
color:#FFFFFF;    }   
 #bt{ 
   padding-left:20px;  
  margin-top:30px;  } 
  comments {  
 width:100%;  
 overflow:auto;  
 word-break:break-all;
  }
</style>

</head>

<body>
	<br>

	<div id="wrapper" align=center style="width:500px"> 
		<div id="head" align=center >
			<h2>添加项目</h2>
		</div>

		<form name="addproject" action="addproject"
			enctype="multipart/form-data" method="post"
			onsubmit="return check()">
			<div id="shoulder" >
				<table align="center" border="0" cellspacing="0"
					cellpadding="0">
					<tr>
						<td id="fore" style="width: 407px; ">项目名： <span>*</span> 
						<input type="text" name="project.projectName" style="width:300px"></td>
					</tr>
					<tr align="right">
						<td id="fore"><span style="position: relative;top:-142px;color:#000">项目描述：</span>
						<textarea rows="10" cols="40" name="project.projectDescribe"></textarea>
						<!-- <input type="textarea" class="comments"
							cols="27" rows="4" name="project.projectDescribe"
							onpropertychange="this.style.posHeight=this.scrollHeight"> --></td>
					</tr>
					<tr align="center">
						<td id="fore"><input type="file" name="projectfile" size="20"></td>
					</tr>
					<tr>
						<td id="fore">工作组：<span>*</span>
						<select name="project.workgroupName">
								<option value="selectmore">下拉选择工作组</option>
								<s:iterator value="grouplist" id="workgroup">
									<option
										value="<s:property value="#workgroup.workgroupName" />">
										<s:property value="#workgroup.workgroupName" />
									</option>
								</s:iterator>
						</select>
						</td>
					</tr>
					<tr align="center">
						<td id="bt"><input type=submit name=submit2 value="确定">
						</td>
					</tr>
				</table>
			</div>
		</form>
	</div>
</body>
</html>
